import Vue from "vue";
import App from "./App.vue";
//引入router路由对象
import router from "@/router";
//引入vuex
import store from "@/store";
//引入全局组件NavType Swiper 进行全局注册
import NavType from "@/components/NavType/NavType";
import Swiper from "@/components/Swiper/Swiper";
import Pagenation from "@/components/Pagenation/Pagenation";
Vue.component("NavType", NavType);
Vue.component("Swiper", Swiper);
Vue.component("Pagenation", Pagenation);

//引入mock关联使用
import "@/mock/mockServer";

//关闭测试提示
Vue.config.productionTip = false;
new Vue({
  render: (h) => h(App),
  //把router路由对象注册到实例上，那么所有的组件实例上都有有一个$router和$route对象
  router,
  //注册store
  store,

  beforeCreate() {
    //定义全局事件总线
    Vue.prototype.$bus = this;
  },
}).$mount("#app");
